/**
 * 
 */
package com.mzba.place.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;

import com.actionbarsherlock.app.SherlockFragment;
import com.mzba.place.R;

/**
 * @author Iris
 *
 */
public class HelpBgFragment extends SherlockFragment {
	
	private int item;
	
	public HelpBgFragment(){
		
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		 setRetainInstance(true);
		super.onCreate(savedInstanceState);
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		ImageView imageView = new ImageView(getActivity());
		imageView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));
		imageView.setBackgroundResource(R.drawable.help_1);
		Bundle bundle = getArguments();
		if (bundle != null) {
			item = bundle.getInt("item");
			switch (item) {
//			case 0:
//				imageView.setImageResource(R.drawable.help_1);
//				break;
			case 1:
				imageView.setBackgroundResource(R.drawable.help_1);
				break;
			case 2:
				imageView.setBackgroundResource(R.drawable.help_2);
				break;
			case 3:
				imageView.setBackgroundResource(R.drawable.help_3);
				break;
			case 4:
				imageView.setBackgroundResource(R.drawable.help_4);
				break;
			case 5:
				imageView.setBackgroundResource(R.drawable.help_5);
				break;
			}
		}
		return imageView;
	}
}
	
